#include <iostream>
#include <string>
#include "program.h"
#include "helper.h"


using namespace std;

//Arguments: output, instruction length,
int main(int argc, char* argv[])
{
	if(argc != 3)
	{
		cout << "Usage: ./aaig output instructioncount" << endl;
		return 0;
	}

	srand(time(0));
	CProgram program;
	cout << "AAIG started" << endl;
	cout << "Generating " << argv[2] << " instructions" << endl;
	program.generateInstructions(Convert<unsigned int>(argv[2]));
    	program.checkForHazards();
	cout << "Writing output to file " << argv[1] << endl;
	program.writeToFile(argv[1]);


	return 0;
}
